#include "SpendTiming.h"


SpendTiming::SpendTiming()
    :curTimePoint_(std::chrono::steady_clock::now())
{

}

SpendTiming::~SpendTiming()
{}

void SpendTiming::ReStart()
{
    curTimePoint_ = std::chrono::steady_clock::now();
}

unsigned int SpendTiming::Elapsed()
{
    auto curTime = std::chrono::steady_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::milliseconds>(curTime - curTimePoint_);

    return duration.count();
}